package org.example.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.pojo.SysUser;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface SysUserMapper {

    @Insert("insert into ay_user values(#{name},#{password},#{email})")
    boolean addSysUser(SysUser sysUser);

    @Select("select * from ay_user")
    List<SysUser> queryAll();

    @Select("select * from ay_user where id = #{id}")
    SysUser queryById(Integer id);


}
